package com.credit.management.system.generator.dao;

import com.credit.management.system.model.Syuserrole;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.ResultMap;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

public interface SyuserroleMapper {
    @Delete({
        "delete from syuserrole",
        "where id = #{id,jdbcType=INTEGER}"
    })
    int deleteByPrimaryKey(Integer id);

    @Insert({
        "insert into syuserrole (id, roleid, ",
        "userid)",
        "values (#{id,jdbcType=INTEGER}, #{roleid,jdbcType=INTEGER}, ",
        "#{userid,jdbcType=INTEGER})"
    })
    int insert(Syuserrole record);

    int insertSelective(Syuserrole record);

    @Select({
        "select",
        "id, roleid, userid",
        "from syuserrole",
        "where id = #{id,jdbcType=INTEGER}"
    })
    @ResultMap("com.credit.management.system.generator.dao.SyuserroleMapper.BaseResultMap")
    Syuserrole selectByPrimaryKey(Integer id);

    int updateByPrimaryKeySelective(Syuserrole record);

    @Update({
        "update syuserrole",
        "set roleid = #{roleid,jdbcType=INTEGER},",
          "userid = #{userid,jdbcType=INTEGER}",
        "where id = #{id,jdbcType=INTEGER}"
    })
    int updateByPrimaryKey(Syuserrole record);
}